package com.hs;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ConcurrentParallel {

    public static void testConcurrentHashMap(){
        ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
        Object put = concurrentHashMap.put("keyStr", "valueStr");
        Object ss = concurrentHashMap.get("keyStr");
        System.out.println(ss);
    }

    public static void testHashMap(){
        Map<String,String > map = new HashMap();
        map.put("keyStr1", "valueStr1");
        map.put("keyStr2", "valueStr2");
        Object ss = map.get("keyStr1");
        System.out.println(ss);
    }

    public static void main(String[] args) {
        testHashMap();
    }

}
